<template>
    <div class="father">
        父元素
        <div class="son">
            子元素
        </div>
    </div>
</template>
<script setup>
import { onMounted,onUnmounted } from 'vue';
onMounted(()=>{
    console.log('props挂载完成');
})
onUnmounted(()=>{
    console.log('props卸载完成');
})
</script>

<style>
.father{
    width: 200px;
    height: 200px;
    background-color: #f0f0f0;
    position: relative;
}
.son{
    width: 100px;
    height: 100px;
    background-color: #ff0000;
    position: absolute;
    top: 50px;
    left: 50px;
}
</style>